import { Layout } from "antd"
import styled from "styled-components"
import Header from "./layout/Header"
import Content from "./layout/Content"
import Footer from "./layout/Footer"
import { Route, Routes, useLocation } from "react-router-dom"
import Home from "./page/Home"
import Demo from "./page/Demo"


const StyledLayout = styled(Layout)`

`



const App = () => {
  const { pathname } = useLocation();
  return (
    <StyledLayout>
      <Header />
      <Content>
        <Routes
          location={pathname}
        >
          <Route
            path="/"
            Component={Home}
          />
          <Route
            path="/demo"
            Component={Demo}
          />
        </Routes>
      </Content>
      <Footer />
    </StyledLayout>
  )
}
export default App